<template>
	<view>
		<image src="../../../static/img/Rectangle.png" style="width: 750rpx;height: 358rpx;" mode=""></image>
		<view class="flex-column position-relative" style="top:-358rpx;">
			<view class="flex align-center justify-center" style="height: 220rpx;">
				<view class="font-weight-bold colorfff" style="text-shadow:0rpx 5rpx 12rpx rgba(9,159,255,0.08);font-size: 100rpx;">{{code}}</view>
			</view>
			<view class="px-3">
				<view class="p-3 bg-white" style="box-shadow:0rpx 11rpx 16rpx 2rpx rgba(0,66,107,0.08);border-radius:6rpx;">
					<view class="font32 font-weight-500 mb-4">积分明细</view>
					<scroll-view scroll-y="true" >
						<view class="flex align-center justify-between mb-4" v-for="(item,index) in list" :key="index">
							<view class="flex-column">
								<view class="font26">{{item.type}}</view>
								<view class="font20 color999">{{item.date}}</view>
							</view>
							<view class="color333 font26">+{{item.value}}</view>
						</view>
					</scroll-view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			code:0,
			list: []
		};
	},
	onLoad() {
		this.code=uni.getStorageSync('userInfo').jifen;
		this.getData();
	},
	methods: {
		getData() {
			let this_ = this;
			let opts = {
				url: 'jifen/Details.shtml'
			};
			let param = {};
			this_.$http.httpTokenRequest(opts, param).then(
				res => {
					console.log(res.data);
					if (res.data.code == '200') {
						this_.list=res.data.data;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				error => {
					console.log(error);
				}
			);
		}
	}
};
</script>

<style></style>
